import request from '@/utils/request'

// 查询企业的部门列表接口
export function getDepartmentList() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}

// 根据 id删除部门
export function delDepartment(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}

// 新增部门接口
export function addDepartment(data) {
  return request({
    url: '/company/department',
    data,
    method: 'POST'
  })
}

// 根据 id修改部门
export function updateDepartment(id, data) {
  return request({
    url: `/company/department/${id}`,
    method: 'PUT',
    data
  })
}

// 根据 id获取企业详细数据
export function companyInfo(id) {
  return request({
    url: `/company/${id}`
  })
}

